import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:sleep/help_style.dart';
import 'package:flutter/material.dart';

class HomeHeader extends ConsumerWidget {
  final double length;
  const HomeHeader({Key? key, required this.length}) : super(key: key);

  Widget button(Widget label, Widget icon, VoidCallback onPressed) {
    return GestureDetector(
      onTap: onPressed,
      child: Row(
        children: [label, icon],
      ),
    );
  }

  Widget chart(BuildContext context) {
    // final p = Provider.of<PeakValleyProvider>(context, listen: true);

    return Container();
    // return Consumer(builder: (_, d, peak, ___) {
    //   final pdata = peak.dataStream;

    //   return FaDetailChart(
    //     aspectRatio: 1,
    //     spots: pdata,
    //     maxX: kWindowsShowLength,
    //     minX: 0,
    //     mimResolution: 0.25,
    //     maxY: 1.25,
    //     minY: -1.25,
    //   );
    // });
  }

  @override
  Widget build(BuildContext context, ref) {
    return Container(
      decoration: HelpStyle.decoration,
      child: Column(
        children: [
          chart(context),
        ],
      ),
    );
  }
}
